package com.e2oto.seller.modules.seller.ui;


import android.content.Intent;
import android.view.View;

import com.e2oto.seller.R;
import com.e2oto.seller.common.base.BaseMvpFragment;
import com.e2oto.seller.common.utils.ToastUtils;
import com.e2oto.seller.modules.seller.presenter.ShopPresenter;
import com.e2oto.seller.modules.seller.views.ShopView;
import com.gyf.barlibrary.ImmersionBar;

import butterknife.OnClick;

/**
 * Created by ZhangLiQiang on 2017/9/11.
 */

public class ShopFragment extends BaseMvpFragment<ShopView, ShopPresenter> implements ShopView {


    @Override
    protected void onFragmentFirstVisible() {
        super.onFragmentFirstVisible();


    }

    @Override
    protected void onFragmentVisibleChange(boolean isVisible) {
        super.onFragmentVisibleChange(isVisible);
        if (isVisible) {
            mImmersionBar = ImmersionBar.with(this).statusBarColor(R.color.theme_color).fitsSystemWindows(true);
            mImmersionBar.init();
        } else {
        }
    }

    @Override
    protected int getContentView() {
        return R.layout.fragment_shop;
    }

    @Override
    public void showMessage(String msg) {
        ToastUtils.INSTANCE.showToast(getActivity(), msg);
    }

    @Override
    public ShopPresenter createPresenter() {
        return new ShopPresenter();
    }

    @OnClick({R.id.shop_goods_manage_rl})
    public void onClick(View view) {
        switch (view.getId()) {
            case R.id.shop_goods_manage_rl:
                startActivity(new Intent(getActivity(), GoodsManageActivity.class));
                break;
        }
    }
}
